Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyperv: Run "sudo poweroff" before stopping VM #4758

Merged
merged 2 commits into from
Jul 29, 2019

Conversation

blueelvis
Copy link
Contributor

Fixes #4661 #2914

  • If the driver is Hyper-V, minikube stop will first run sudo poweroff via SSH into the minikube Virtual Machine and then proceed ahead with the normal stop related procedures.
  • Reduced the number of retries from 5 to 3. 5 seems to be quite high.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 14, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @blueelvis. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 14, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: blueelvis
To complete the pull request process, please assign afbjorklund
You can assign the PR to them by writing /assign @afbjorklund in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

Copy link
Contributor

@tstromberg tstromberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I did not realize until now that we weren't even attempting SSH poweroff unless delete was called. Just some minor stylistic changes to request.

pkg/minikube/cluster/cluster.go Outdated Show resolved Hide resolved
pkg/minikube/cluster/cluster.go Outdated Show resolved Hide resolved
pkg/minikube/cluster/cluster.go Outdated Show resolved Hide resolved
@tstromberg tstromberg changed the title Add conditional to poweroff on Hyper-V VM using SSH hyperv: Run "sudo poweroff" before stopping VM Jul 15, 2019
@tstromberg
Copy link
Contributor

@minikube-bot OK to test

@medyagh
Copy link
Member

medyagh commented Jul 17, 2019

@blueelvis the PR looks good to me, after the above comments are fixed.

@medyagh medyagh changed the title hyperv: Run "sudo poweroff" before stopping VM WIP: hyperv: Run "sudo poweroff" before stopping VM Jul 17, 2019
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 17, 2019
@medyagh
Copy link
Member

medyagh commented Jul 17, 2019

I mark this WIP, please ping me when updated

@tstromberg
Copy link
Contributor

Tests look good. I am very eager to see this merged once review comments are addressed.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 19, 2019
@blueelvis blueelvis force-pushed the 4661-force-poweroff-in-hyperv branch from f422a9e to ed94288 Compare July 20, 2019 17:41
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 20, 2019
@blueelvis
Copy link
Contributor Author

@medyagh - Done. Sorry for the delay, got caught up in office. Let me know once you are about to configure Windows tests. Would love to see how you set it up :)

@tstromberg - Glad to hear that! Just curious though that even after I have marked your comments as resolved, the robot is still saying that there are changes requested.

-Pranav

@medyagh
Copy link
Member

medyagh commented Jul 20, 2019

@blueelvis thank you for resolving the requests, I will hook up the windows tests next week. have you tested them locally?

@blueelvis
Copy link
Contributor Author

@medyagh - Sure. Let me know once they have been hooked up. Yes, I have tested them locally and the issues mentioned above are being fixed with this PR.

@tstromberg tstromberg changed the title WIP: hyperv: Run "sudo poweroff" before stopping VM hyperv: Run "sudo poweroff" before stopping VM Jul 29, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 29, 2019
@tstromberg tstromberg merged commit a05a26e into kubernetes:master Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

minikube VM on Hyper-V is in "Shutting Down" state since 30+ minutes
5 participants